/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gap.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Yunita
 */
@Entity
@Table(name = "gap_master_religion")
@XmlRootElement
//@NamedQueries({
//    @NamedQuery(name = "GapMasterReligion.findAll", query = "SELECT g FROM GapMasterReligion g"),
//    @NamedQuery(name = "GapMasterReligion.findBySync", query = "SELECT g FROM GapMasterReligion g WHERE g.sync = :sync"),
//    @NamedQuery(name = "GapMasterReligion.findByReligionId", query = "SELECT g FROM GapMasterReligion g WHERE g.religionId = :religionId"),
//    @NamedQuery(name = "GapMasterReligion.findByReligionName", query = "SELECT g FROM GapMasterReligion g WHERE g.religionName = :religionName")})
public class GapMasterReligion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "sync")
    private String sync;
    @Id
    @Basic(optional = false)
    @Column(name = "religion_id")
    private Integer religionId;
    @Column(name = "religion_name")
    private String religionName;
    @Lob
    @Column(name = "religion_description")
    private String religionDescription;


    public GapMasterReligion() {
    }

    public GapMasterReligion(Integer religionId) {
        this.religionId = religionId;
    }

    public String getSync() {
        return sync;
    }

    public void setSync(String sync) {
        this.sync = sync;
    }

    public Integer getReligionId() {
        return religionId;
    }

    public void setReligionId(Integer religionId) {
        this.religionId = religionId;
    }

    public String getReligionName() {
        return religionName;
    }

    public void setReligionName(String religionName) {
        this.religionName = religionName;
    }

    public String getReligionDescription() {
        return religionDescription;
    }

    public void setReligionDescription(String religionDescription) {
        this.religionDescription = religionDescription;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (religionId != null ? religionId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GapMasterReligion)) {
            return false;
        }
        GapMasterReligion other = (GapMasterReligion) object;
        if ((this.religionId == null && other.religionId != null) || (this.religionId != null && !this.religionId.equals(other.religionId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return  religionName;
//        return "com.gap.entities.GapMasterReligion[ religionId=" + religionId + " ]";
    }
    
}
